import request from '../utils/request'
// 获取菜单
export const getMenus = () => {
  return request({
    method: 'GET',
    url: '/menus'
  })
}
// 添加
export const addMenus = data => {
  console.log(data)
  return request({
    method: 'POST',
    url: '/menus',
    data
  })
}
// 修改
export const editOneMenus = data => {
  return request({
    method: 'PUT',
    url: `/menus/${data.id}`,
    data
  })
}
// 菜单详情

export const getOneMenus = id => {
  return request({
    method: 'GET',
    url: `/menus/${id}`
  })
}
// 删除菜单
export const delMenus = id => {
  return request({
    method: 'DELETE',
    url: `/menus/${id}`
  })
}
